#include "hplccommontabpage.h"

HplcCommonTabPage::HplcCommonTabPage(QWidget *parent) : QWidget(parent)
{
    setWindowTitle(tr("Hplc Common Tab Page"));
    setAttribute(Qt::WA_DeleteOnClose);

    hplcCommonPage = new HplcCommonPage();
    hplcCommonSystemPage = new HplcCommonSystemPage();
    hplcPermitPage = new HplcPermitPage();

    tabWidget = new QTabWidget();
    tabWidget->addTab(hplcCommonPage, tr("Common"));
    tabWidget->addTab(hplcCommonSystemPage, tr("CommonSystem"));
    tabWidget->addTab(hplcPermitPage, tr("Permit"));

    QVBoxLayout *vbl = new QVBoxLayout();
    vbl->addWidget(tabWidget);
    setLayout(vbl);
}

void HplcCommonTabPage::closeEvent(QCloseEvent *event)
{
    Q_UNUSED(event);

    hplcCommonPage->close();
    hplcCommonSystemPage->close();
    hplcPermitPage->close();
    tabWidget->close();
}
